1. Field of the Invention
The present invention relates to image processing apparatus and method. In particular, the invention relates to an apparatus and a method that can determine an output state of a pixel to be output, among a plurality of output states which the pixel can take, the determination being made in consideration of the probability of occurrence of each output state.
2. Description of the Related Art
An image processing apparatus has been known that reduces gray scale levels of a multi-gray-level image and then outputs a resultant image. One of known methods for reproducing the entire gradation of an input image is error diffusion.
FIG. 44 is a block diagram showing a structure of an image processing apparatus employing the error diffusion method.
Referring to FIG. 44, the image processing apparatus includes an input unit 801 supplying pixel values (input signals) one by one from a multi-gray-level image to be processed, a subtracter 803 subtracting an error from the input pixel value, a thresholding unit 807 thresholding the output of subtracter 803, an output unit 809 outputting the thresholded value, and a subtracter 811 subtracting the output of subtracter 803 from the thresholded value to calculate the error.
The applicant of the present application proposes in Japanese Patent Application No. 11-237492 threshold diffusion method according to which the difference between a threshold and an output value is used for processing neighboring pixels.
FIG. 45 is a block diagram showing an image processing apparatus employing the threshold diffusion method.
Referring to FIG. 45, the image processing apparatus includes an input unit 901 supplying a pixel value of image data to be processed, a thresholding unit 903 thresholding the pixel value, an output unit 905 outputting the thresholded value, an initial threshold generator 913 supplying initial threshold Th (x), a subtracter 915 subtracting an error of the threshold from the value from initial threshold generator 913, an inverting unit 907 inverting the thresholded value, a subtracter 909 subtracting the output of subtracter 915 from the output of the inverting unit 907 to output the error of the threshold, and a β multiplier 911 multiplying the output of subtracter 909 by coefficient β.
The image processing apparatus using the threshold diffusion method “diffuses” the error of the threshold to a threshold for processing neighboring pixels.
The error diffusion or threshold diffusion method discussed above can be used to binarize an image of multiple gray levels. Further, the error diffusion or threshold diffusion method can be applied to each of a plurality of regions created by dividing an input range to convert a multi-gray-level image into an image of an arbitrary number (at least three) of gray levels (see for example Japanese Patent Application No. 11-237492 referred to above). However, these methods cannot implement three or more gray levels mixed, with respect to an input value for a certain region.
According to a proposed method for implementing a mixture of three or more gray levels (or three or more output states), the error diffusion method can be applied to a vector space. This approach is not enough to uniformly distribute the mixed states.
In addition, when an image data is to be output, the gray levels of the image data should be reduced (halftoning) depending on the number of gray levels which a device can output. In other words, when one image is to be output from a plurality of different output devices, different halftoning processes are necessary for respective output devices. Then, the output devices require to have separate halftoning functions respectively.
FIG. 46 shows a system of outputting a specific image from a plurality of output devices. Referring to FIG. 46, the system includes a host 501, a network 503, and a plurality of terminals 505a-505d receiving image data. An image to be distributed (distribution image) A is supplied to host 501 and then transmitted to terminals 505a-505d via network 503.
Terminal 505a is coupled to output devices b and c, terminal 505b is coupled to an output device d, and terminal 505c is connected to an output device e.
Distribution image A undergoes an image conversion process in host 501 before being transmitted. In this conversion process, mainly compression is performed for the purpose of reducing image data volume. Image conversion, mainly decompression, is further performed in each of terminals 505a-505d for reconstituting the image.
In output devices b-e, the gray levels of the image data is reduced for output (e.g. the image data is converted to binary or multi-level image).
These processes thus provide output images B-E from output devices b-e respectively.
Even if output devices b-e have a relatively simple structure, halftoning is still necessary in respective output devices having different output levels. Consequently, each output device has its memory and resource under a heavy load or requires a calculation time.
FIGS. 47-50 are flowcharts showing four manners of distributing an image respectively.
Referring to FIG. 47, a distribution image A of n gray-scale levels (n levels) is compressed in step S601 without being halftoned and then transmitted in step S603. On the receiver side, the image data is decompressed in step S605. In step S607, the image data is halftoned for reducing the n gray levels of the image data into m levels. In this way, the receiver side obtains an output image B of m levels.
Referring to FIG. 48, a distribution image A of n levels is first halftoned on the transmitter side to reduce n levels to m levels (S611). The image data is compressed in step S613 and then transmitted in step S615. On the receiver side, the received image data is decompressed in step S617 to obtain an output image B of m levels.
Referring to FIG. 49, an n-level distribution image A is converted on the transmitter side into an nn-level image (S621). The converted image is compressed in step S623 to be transmitted in step S625.
On the receiver side, the image data is decompressed in step S627 and halftoning is performed to convert the nn-level into m-level in step S629. Accordingly, an output image B of m gray levels can be obtained.
Referring to FIG. 50, an n-level distribution image A is converted into an nn-level image (S631). Then, the image is compressed in step S633 to be transmitted in step S635.
On the receiver side, the image data is decompressed in step S637 and the gray scale is reconstituted from nn levels to n levels. In step S641, halftoning is applied for reducing gray levels from n to m levels, and then an output image B of m levels is achieved.
In terms of cost for transmitting an image, the volume of the image is desirably reduced as much as possible. If the image is finally provided from an output device, the image is halftoned which reduces the volume of the image. Accordingly, it would be efficient depending on purposes that an image is first halftoned on the transmitter side as shown in FIG. 48 and then transmitted.
In this case, however, output devices on the receiver side must have the same number of output gray levels. If not, as shown in FIG. 47, the receiver side requires individual halftoning.
The load of halftoning can be reduced even by a small degree by preliminarily decreasing the number of gray levels of an image to a certain extent on the transmitter side, and further decreasing the number of gray levels for each of the output devices. Additionally, the volume of data being transmitted can also be reduced to some extent (see FIG. 49).
The conventional halftoning method, however, has difficulty in directly converting an image with reduced gray levels to an image of further reduced gray levels. Then, as shown in FIG. 50, an image of multiple levels requires reconstruction (S639), which adds load to the receiver side. This process is also disadvantageous in terms of precision in tone reproduction.